package com.boot.security.model.bo;

import com.boot.security.model.po.Access;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.security.access.ConfigAttribute;

/**
 * @author 霜寒 <1621856595@qq.com>
 * @description 权限的包装
 * @date 2020/2/18 22:34
 **/
@Data
@SuperBuilder
@NoArgsConstructor
public class Authority implements ConfigAttribute {

    private Access model;

    public Authority(Access model) {
        this.model = model;
    }

    @Override
    public String getAttribute() {
        return model.getCode();
    }

}
